package com.zdsoft.blp.gongyong.fanhui;

import android.app.Activity;
import android.content.Context;
import android.graphics.Canvas;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.zdsoft.blp.R;

/**
 * Created by Administrator on 2016/8/24.
 */
public class FanHuiView extends FrameLayout{
    private LinearLayout ll_back;
    private TextView tv_title;
    public FanHuiView(Context context) {
        super(context);
        init(context);
    }

    public FanHuiView(Context context, AttributeSet attrs) {
        super(context, attrs);
        init(context);
    }

    public FanHuiView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        init(context);
    }

    private void init(final Context context) {
        LayoutInflater.from(context).inflate(R.layout.fanhui_view,this,true);
        ll_back= (LinearLayout) findViewById(R.id.ll_back);
        tv_title = (TextView) findViewById(R.id.tv_title);

        ll_back.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                ((Activity)context).finish();
            }
        });
    }


    public TextView getTv_title() {
        return tv_title;
    }

    public void setTv_title(TextView tv_title) {
        this.tv_title = tv_title;
    }

    public LinearLayout getLl_back() {
        return ll_back;
    }

    public void setLl_back(LinearLayout ll_back) {
        this.ll_back = ll_back;
    }
}
